package com.app.babygo.obj;

import java.io.Serializable;

import com.app.babygo.help.ActionHelper;

public class Child implements Serializable{

	private static final long serialVersionUID = 1L;
	
	// DB column variable
	private String cid;
	private String childparentid;
	private String childname;
	private int childage;
	private int childgender; //0: unknown, 1: male, 2: female, 3+: undefined
	private String childinfo;
	private String picPath;
	
	// data container variable
	//private AchievementList childachievement;

	public Child() {
		this.cid = null;
		this.childname = "Unknown";
		this.childparentid = "Invalid parent ID";
		this.childage = -1;
		this.childgender = 0;
		this.childinfo = "Invalid child information";
		this.picPath = null;
	}

	public Child(String ChildName, String ParentID, int ChildAge, int ChildGender, String ChildInfo, String picPath) {
		this.cid = ActionHelper.ChildIdGenerator();
		this.childname = ChildName;
		this.childparentid = ParentID;
		this.childage = ChildAge;
		this.childgender = ChildGender;
		this.childinfo = ChildInfo;
		this.picPath = picPath;
	}
	
	public Child(String ChildID, String ChildName, String ParentID, int ChildAge, int ChildGender, String ChildInfo, String picPath) {
		this.cid = ChildID;
		this.childname = ChildName;
		this.childparentid = ParentID;
		this.childage = ChildAge;
		this.childgender = ChildGender;
		this.childinfo = ChildInfo;
		this.picPath = picPath;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getChildparentid() {
		return childparentid;
	}

	public void setChildparentid(String childparentid) {
		this.childparentid = childparentid;
	}

	public String getChildname() {
		return childname;
	}

	public void setChildname(String childname) {
		this.childname = childname;
	}

	public int getChildage() {
		return childage;
	}

	public void setChildage(int childage) {
		this.childage = childage;
	}

	public int getChildgender() {
		return childgender;
	}

	public void setChildgender(int childgender) {
		this.childgender = childgender;
	}

	public String getChildinfo() {
		return childinfo;
	}

	public void setChildinfo(String childinfo) {
		this.childinfo = childinfo;
	}
	
	public String getChildPicPath() {
		return picPath;
	}
	
	public void setChildPicPath(String picPath) {
		this.picPath = picPath;
	}
	
	public String toString(){
		return "Child: [" + cid 
				+ " , parent: " + childparentid 
				+ " , name:" + childname
				+ " , age:" + childage
				+ " , gender: " + childgender
				+ " , info: " + childinfo
				+ " , picture_path" + picPath +" ]";
	}
}
